package com.pets.book.aop.aspect;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class BookAop {

    private static final Logger logger = LoggerFactory.getLogger(BookAop.class);

    @Pointcut("@annotation(com.pets.book.aop.anno.AopAnnotation)")
    public void point(){

    }

    @Before("point()")
    public void log(){
        logger.info("执行aop逻辑");
    }
}
